﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ControlCenter.通讯;

namespace 转发程序
{
    public interface 监听服务
    {  /// <summary>
        /// 接受端口的事件委托
        /// </summary>
          event EventHandler<TcpServerEventArgs> OnAcceptSocket;

        /// <summary>
        /// 断开客户端连接时的事件委托
        /// </summary>
          event EventHandler<TcpServerEventArgs> OnClientDisconnected;

          /// <summary>
          /// 接收数据的事件委托
          /// </summary>
           event EventHandler<TcpServerEventArgs> OnReceiveData;

        /// <summary>
        /// 监听端口
        /// </summary>
        System.Net.IPEndPoint ServerIPEndPoint
        {
            get;
        
        }
        /// <summary>
        /// 开始
        /// </summary>
        void Start();
        /// <summary>
        /// 停止监听服务
        /// </summary>
        /// <returns>是不是已经成功停止</returns>
        bool Stop();
    }
}
